home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Deleting lines from text files.
- Date: Wed, 27 Mar 96 12:30:15 GMT
- Organization: none
- Message-ID: <827929815snz@genesis.demon.co.uk>
- References: <4j749k$qs9@eiger.pncl.co.uk>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4j749k$qs9@eiger.pncl.co.uk>
- henrya@pncl.co.uk "Henry Audley-Charles" writes:
-
- >My text file contains numbers in the range 01 to 49 ie lottery style.
- >Each set of six numbers occupies a line of text in the .dat file. I
- >can add new lines at the end but can't delete lines.
-
- Was there supposed to be a question there?
-
- > Also, what is
- >the difference between fprintf (" ...... "); & fwrite (stream, "
- >.. ") etc. I have tried both but seem to end up with the wrong
- >bits being removed.
-
- Post code. The difference between fprintf and fwrite is that the former
- writes text style output controlled by a format string while the latter
- writes binary style data corresponding to the internal representation of
- an object.
-
- > I think its somthing to do with fseek or rewind.
-
- No, both write characters starting at the current file position and moving
- it on appropriately.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-